package com.qdlc.p2p.dal.dto;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.qdlc.p2p.common.constant.Global;

/**
 * 项目待还计划实体
 *
 * @author liya
 * @version 1.1.0.0
 */
@Entity
@Table(name = Global.DB_PREFIX + "additional_flow_repay_plan")
public class AdditionalFlowRepayPlan {

    /** 主键 */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;

    /** 理财项目id */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "flow_project_id")
    private AdditionalFlowProject flowProject;

    /** 期数 */
    private int period;

    /** 状态:0未还，1:已还 */
    private byte status;

    /** 状态:0:未还，1:已还 */
    private byte webStatus;

    /** 出款人 */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "user_id")
    private User user;

    /** 预计归还本金 */
    private double repayMoney;

    /** 预计归还收益 */
    private double repayCopies;

    /** 预计归还时间 */
    private Date repayTime;

    /** x实际归还本金 */
    private double repayYesmoney;

    /** 实际归还收益 */
    private double repayYescopies;

    /** 实际还款时间 */
    private Date repayYestime;

    /** 收益计划表id */
    private long yieldPlanId;

    /**
     * 获取主键
     *
     * @return 主键
     */
    public long getId() {
        return id;
    }

    /**
     * 设置主键
     *
     * @param id 要设置的主键
     */
    public void setId(long id) {
        this.id = id;
    }

    /**
     * 获取期数
     *
     * @return 期数
     */
    public int getPeriod() {
        return period;
    }

    /**
     * 设置期数
     *
     * @param period 要设置的期数
     */
    public void setPeriod(int period) {
        this.period = period;
    }

    /**
     * 获取状态:0未还，1:已还
     *
     * @return 状态:0未还，1:已还
     */
    public byte getStatus() {
        return status;
    }

    /**
     * 设置状态:0未还，1:已还
     *
     * @param status 要设置的状态:0未还，1:已还
     */
    public void setStatus(byte status) {
        this.status = status;
    }

    /**
     * 获取预计归还本金
     *
     * @return 预计归还本金
     */
    public double getRepayMoney() {
        return repayMoney;
    }

    /**
     * 设置预计归还本金
     *
     * @param repayMoney 要设置的预计归还本金
     */
    public void setRepayMoney(double repayMoney) {
        this.repayMoney = repayMoney;
    }

    /**
     * 获取预计归还收益
     *
     * @return 预计归还收益
     */
    public double getRepayCopies() {
        return repayCopies;
    }

    /**
     * 设置预计归还收益
     *
     * @param repayCopies 要设置的预计归还收益
     */
    public void setRepayCopies(double repayCopies) {
        this.repayCopies = repayCopies;
    }

    /**
     * 获取预计归还时间
     *
     * @return 预计归还时间
     */
    public Date getRepayTime() {
        return repayTime;
    }

    /**
     * 设置预计归还时间
     *
     * @param repayTime 要设置的预计归还时间
     */
    public void setRepayTime(Date repayTime) {
        this.repayTime = repayTime;
    }

    /**
     * 获取实际归还本金
     *
     * @return 实际归还本金
     */
    public double getRepayYesmoney() {
        return repayYesmoney;
    }

    /**
     * 设置实际归还本金
     *
     * @param repayYesmoney 要设置的实际归还本金
     */
    public void setRepayYesmoney(double repayYesmoney) {
        this.repayYesmoney = repayYesmoney;
    }

    /**
     * 获取实际归还收益
     *
     * @return 实际归还收益
     */
    public double getRepayYescopies() {
        return repayYescopies;
    }

    /**
     * 设置实际归还收益
     *
     * @param repayYescopies 要设置的实际归还收益
     */
    public void setRepayYescopies(double repayYescopies) {
        this.repayYescopies = repayYescopies;
    }

    /**
     * 获取实际还款时间
     *
     * @return 实际还款时间
     */
    public Date getRepayYestime() {
        return repayYestime;
    }

    /**
     * 设置实际还款时间
     *
     * @param repayYestime 要设置的实际还款时间
     */
    public void setRepayYestime(Date repayYestime) {
        this.repayYestime = repayYestime;
    }

    public AdditionalFlowProject getFlowProject() {
        return flowProject;
    }

    public void setFlowProject(AdditionalFlowProject flowProject) {
        this.flowProject = flowProject;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }


    public long getYieldPlanId() {
        return yieldPlanId;
    }

    public void setYieldPlanId(long yieldPlanId) {
        this.yieldPlanId = yieldPlanId;
    }

    public byte getWebStatus() {
        return webStatus;
    }

    public void setWebStatus(byte webStatus) {
        this.webStatus = webStatus;
    }


}


